package com.geek.water.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author chenmin
 * @desc 用户分页查询参数
 * @date 2025/8/5
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("用户分页查询参数")
public class UserPageQueryVO {
    @ApiModelProperty(value = "当前页码")
    private Integer currentPage = 1;

    @ApiModelProperty(value = "每页数量")
    private Integer pageSize = 10;

    @ApiModelProperty(value = "综合搜索词（用户名/手机号/邮箱）")
    private String queryString;

    @ApiModelProperty(value = "用户状态", allowableValues = "enabled,disabled")
    private String status;

    @ApiModelProperty(value = "客户ID")
    private Long customerId;

    @ApiModelProperty(value = "创建时间-开始")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAtStart;

    @ApiModelProperty(value = "创建时间-结束")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAtEnd;

    @ApiModelProperty(value = "排序字段", allowableValues = "createdAt,lastLoginTime,username")
    private String sortField;

    @ApiModelProperty(value = "排序方式", allowableValues = "asc,desc")
    private String sortOrder;
}
